CC = g++
LIBS= -lSDL_image -lSDL -lSDL_ttf -lpthread
LTEST= `sdl-config --libs`

all : TCP

TCP : serv cli

serv : serv.cpp servPartida.cpp Mensajes.cpp sockets.o tateti.o
	$(CC) serv.cpp servPartida.cpp Mensajes.cpp -lpthread -g -o serv sockets.o tateti.o $(LIBS)

cli : cli.cpp pantalla.o sockets.o
	$(CC) cli.cpp pantalla.o sockets.o -o cli -g $(LIBS)
	
pantalla.o: include/sdl/pantalla.cpp
	$(CC) -c include/sdl/pantalla.cpp $(LIBS)

sockets.o: include/sockets/sockets.cpp
	$(CC) -c include/sockets/sockets.cpp -lpthread

tateti.o: include/s_func/tateti.cpp
	$(CC) -c include/s_func/tateti.cpp

clean :
	rm *.o serv cli
